/*
 * ScoreFileIO.h
 *
 *  Created on: Sep 2, 2009
 *      Author: Thada Pipatcharoenkij 49270325
 */

#ifndef SCOREFILEIO_H_
#define SCOREFILEIO_H_

#include <iostream>
#include <fstream>
#include <vector>
#include <string>

#include "Score.h"

using namespace std;

class ScoreFileIO {
public:
	ScoreFileIO();
	virtual ~ScoreFileIO();
	void initializeFile();
	void readInput();
	void enterNewRecord(string line);
	void printScores();
	void writeOutput();
private:
	Score extractNameScore(string line);
	void sort(Score newScore);
};

#endif /* SCOREFILEIO_H_ */
